<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var score = prompt("请输入一个分数:");
        // switch语句
        switch (+score) {
            case 100:
                alert("满分");
                break;
            case 90:
                alert("优");
                break;
            case 80:
                alert("良");
                break;
            case 70:
                alert("好");
                break;
            case 60:
                alert("及格");
                break;
            default:
                alert("不及格");
                break;
        }
    </script>
</body>
</html>
